
let  app = angular.module('testApp',[]);
// $scope 是一个应用对象(属于应用变量和函数)
//$scope （相当于作用域、控制范围）用来保存AngularJS Model(模型)的对象。

app.controller('ngController',function ($scope,) {
    $scope.firstName = '';
    $scope.lastName = '';
    $scope.showfullName = function () {
        $scope.fullName = '我的全名是' + $scope.firstName + $scope.lastName;
        alert('登录成功' + $scope.fullName);
    }
});


app.controller("titleController",function ($scope) {
        $scope.title = "登录";
});


